﻿@{
    ViewBag.Title = "Vacations Report By Employee";
}
<h2>
    Vacations Report By Employee</h2>
<fieldset>
    <legend>Employee</legend>
    <div style="display: table; width: 100%">
        <div style="display: table-row">
            <div style="display: table-cell">
                <div class="display-label">
                    Name</div>
                <div class="display-field">
                    @ViewBag.CurrentEmployee.FirstName @ViewBag.CurrentEmployee.FirstLastName @ViewBag.CurrentEmployee.SecondLastName
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    Team</div>
                <div class="display-field">
                    @ViewBag.TeamName
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    Position</div>
                <div class="display-field">
                    @ViewBag.PositionName
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    Manager</div>
                <div class="display-field">
                    @ViewBag.ManagerName
                </div>
            </div>
        </div>
        <div style="display: table-row">
            <div style="display: table-cell">
                <div class="display-label">
                    Total Vacations</div>
                <div class="display-field">
                    @ViewBag.TotalVacations
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    Remaining Vacations</div>
                <div class="display-field">
                    @ViewBag.RemainingDays
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    Taken Vacations</div>
                <div class="display-field">
                    @ViewBag.TakenDays
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    Reserved Vacations</div>
                <div class="display-field">
                    @ViewBag.ReservedDays
                </div>
            </div>
        </div>
    </div>
</fieldset>
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
    <tr>
        <th>
            Taken
        </th>
        <th>
            Pending
        </th>
    </tr>
    <tr>
        <td style="vertical-align: top;">
            <table style="width: 100%;">
                <tr>
                    <th>
                        Date
                    </th>
                    <th>
                        Comment
                    </th>
                </tr>
                @foreach (VacationsRequest.Models.VacationDay item in ViewBag.VacationsListTaken)
                {
                    <tr @Html.UsedDateStyle(item.Date)>
                        <td style="text-align:center">
                            @item.Date.ToShortDateString()
                        </td>
                        <td>
                            @item.Comment
                        </td>
                    </tr>
                }
            </table>
        </td>
        <td style="vertical-align: top;">
            <table style="width: 100%;">
                <tr>
                    <th>
                        Date
                    </th>
                    <th>
                        Comment
                    </th>
                </tr>
                @foreach (VacationsRequest.Models.VacationDay item in ViewBag.VacationsLisReserved)
                {
                    <tr @Html.UsedDateStyle(item.Date)>
                        <td style="text-align:center">
                            @item.Date.ToShortDateString()
                        </td>
                        <td>
                            @item.Comment
                        </td>
                    </tr>
                }
            </table>
        </td>
    </tr>
</table>
